<?php
$user_result = mysql_query("SELECT articles.id, articles.date, articles.header, users.name FROM articles, users WHERE articles.accepted=TRUE AND articles.user=users.id AND articles.deleted=FALSE");
if (mysql_error())
    die(mysql_error());
?>


<p class="page-header-text">Все статьи</p>
<table id="articles-table">
    <tbody>
<?php

while ($row = mysql_fetch_array($user_result)) {
    echo ('<tr>');
    echo ('<td class="td_artic_date">' . $row['date'] . '</td>');
    echo ('<td class="td_artic_header"><a href="./article.php?id=' . $row['id'] . '">' . substr($row['header'], 0, 50));
    echo ('</a> (' . $row['name'] . ')</td>');
    echo ('</tr>');
}
?>
    </tbody>
</table>